import Vue from "vue";

import "normalize.css/normalize.css"; // A modern alternative to CSS resets
import "@/styles/index.scss"; // global css

import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";

import userAvatar from "@/components/UserAvatar/index.vue";

import * as filters from "@/utils/filters";

import App from "./App.vue";
import store from "./store";
import router from "./router";

import "@/icons"; // icon
import "@/permission"; // permission control

Vue.use(ElementUI);

Vue.component("userAvatar", userAvatar);

// filters
Object.keys(filters).forEach((filterName) => {
    Vue.filter(filterName, filters[filterName]);
});

Vue.config.productionTip = false;

new Vue({
    router,
    store,
    render: (h) => h(App),
}).$mount("#app");
